{include file="public_head" /}

<body class="nav-md">

<div class="container body">


    <div class="main_container">

        {include file="public_sidebar,public_nav" /}

        <!-- page content -->
        <div class="right_col" role="main">
            <div class="">
                <div class="page-title">
                    <div class="title_left">
                        <h3>
                            红包充值规则
                        </h3>
                    </div>
                </div>
                <div class="clearfix"></div>

                <div class="row">

                    <div class="col-md-12 col-sm-12 col-xs-12">
                        <div class="x_panel">
                            <div class="x_title">
                                <h2>{$mate_title}</h2>
                                <div class="clearfix"></div>
                            </div>
                            <div class="x_content">
                                <form name="form" id="form" method="post" action="">
                                    <table class="table table-striped table-bordered table-hover">
                                        <thead>
                                        <tr class="success">
                                            <th align="center"><input type="checkbox" class="checkall"
                                                                      onclick="CheckAll(this.checked);"/></th>
                                            <th style="width: 10%;">充值规则名称</th>
                                            <th style="width: 15%;">充值金额下限</th>
                                            <th style="width: 15%;">充值金额上限</th>
                                            <th style="width: 15%;">红包金额</th>
                                            <th style="width: 15%;">满减金额</th>
                                            <th style="width: 10%;">红包有效期(天)</th>
                                            <th style="width: 15%;">操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {empty name="data"}
                                        <tr>
                                            <td colspan="8">
                                                <div style='font-size:24px;margin:30px 0;'>没有找到记录</div>
                                            </td>
                                        </tr>
                                        {/empty}
                                        {volist name="data" id="item"}
                                        <tr>
                                            <td align="center">
                                                <input type="checkbox" name="id[]" value="{$item.id}"/>
                                            </td>
                                            <td align="center">
                                                <input type="text" name="MemberName[]" id="MemberName[]"
                                                       class="form-control" value="{$item.name|default=''}"
                                                       style="width:100%;text-align: center"/>
                                                <input type="hidden" name="ids[]" value="{$item.id}"/>
                                            </td>
                                            <td align="center">
                                                <input type="text" name="expA[]" id="expA[]"
                                                       class="form-control"
                                                       value="{$item.exp_a|default=''}"
                                                       style="width:100%;text-align: center"/>
                                            </td>
                                            <td align="center">
                                                <input type="text" name="expB[]" id="expB[]"
                                                       class="form-control"
                                                       value="{$item.exp_b|default=''}"
                                                       style="width:100%;text-align: center"/>
                                            </td>
                                            <td align="center">
                                                <input type="text" name="ActualPrice[]" id="ActualPrice[]"
                                                       class="form-control"
                                                       value="{$item.actual_price|default=''}" datatype="n"
                                                       style="width:100%;text-align: center"/>
                                            </td>
                                            <td align="center">
                                                <input type="text" name="VirtualPrice[]" id="VirtualPrice[]"
                                                       class="form-control"
                                                       value="{$item.virtual_price|default=''}" datatype="n"
                                                       style="width:100%;text-align: center"/>
                                            </td>
                                            <td align="center">
                                                <input type="text" name="Durations[]" id="Durations[]" datatype="n"
                                                       class="form-control"
                                                       value="{$item.duration|default=''}"
                                                       style="width:100%;text-align: center"/>
                                            </td>
                                            <td>
                                                <a href="{:url('console/RedPacketRule/destroy', ['id' => $item['id']])}"
                                                   class="label label-danger"
                                                   onClick="return confirm('确定删除吗?')"
                                                >
                                                    <span class="fa fa-times"></span>&nbsp;&nbsp;删 除
                                                </a>
                                            </td>
                                        </tr>
                                        {/volist}
                                        </tbody>
                                        <tr align="center" style="background-color:#FFF;">
                                            <td height="30" colspan="5"><strong>新增一个级联组</strong></td>
                                        </tr>
                                        <tr align="left">
                                            <td height="36" align="center">&nbsp;</td>
                                            <td height="36" align="center"><input type="text" name="name" id="name"
                                                                                  placeholder="充值规则名"
                                                                                  class="form-control"
                                                                                  style="width:200px;text-align: center"/>
                                            </td>
                                            <td align="center"><input type="text" name="exp_a" id="exp_a"
                                                                      placeholder="充值金额下限（请输入整数）" class="form-control"
                                                                      style="width:200px;text-align: center"/>
                                            </td>
                                            <td align="center"><input type="text" name="exp_b" id="exp_b"
                                                                      placeholder="充值金额上限（请输入整数）" class="form-control"
                                                                      style="width:200px;text-align: center"/>
                                            </td>
                                            <td align="center"><input type="text" name="actual_price" id="actual_price"
                                                                      placeholder="红包面值（请输入整数）" class="form-control"
                                                                      style="width:200px;text-align: center"/>
                                            </td>
                                            <td align="center"><input type="text" name="virtual_price"
                                                                      id="virtual_price"
                                                                      placeholder="满减面值（请输入整数）" class="form-control"
                                                                      style="width:200px;text-align: center"/>
                                            </td>
                                            <td align="center"><input type="text" name="duration" id="duration"
                                                                      placeholder="有效期（天）" class="form-control"
                                                                      style="width:200px;text-align: center"/>
                                            </td>
                                            <td colspan="2" align="center">&nbsp;</td>
                                        </tr>

                                        <tbody align="left">
                                        <tr>
                                            <td colspan="8"><span class="selArea"><span>选择：</span> <a
                                                    href="javascript:DelAllNone('{:url(\'console/RedPacketRule/destroy\')}');"
                                                    onclick="return ConfDelAll(0);"
                                                    style="color:#428BCA">选择删除</a></span><a
                                                    class="btn btn-outline btn-primary btn-xs" href="#"
                                                    onclick="form.submit();" style="float:right;">更新全部</a></td>
                                        </tr>
                                        </tbody>
                                    </table>
                                </form>
                            </div>
                        </div>
                    </div>

                </div>
            </div>

        </div>
        <!-- /page content -->
    </div>

</div>

{include file="public_foot" /}
<!-- Datatables-->
<script src="__STATIC__/js/datatables/jquery.dataTables.min.js"></script>
<script src="__STATIC__/js/datatables/dataTables.bootstrap.js"></script>
<!-- public -->
<script src="__STATIC__/js/public.js"></script>
<!-- layer -->
<script src="__STATIC__/js/layer.js"></script>